package com.cykj.eurekaclient.mapping;

import com.cykj.eurekaclient.bean.BackUser;
import com.cykj.eurekaclient.bean.DriverSalaryRecord;
import com.cykj.eurekaclient.bean.DriverSchedule;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @version 1.0
 * @author: xinbin
 * @date: 2021/9/27 16:57
 * @desc:
 */
@Repository
public interface DriverMapper {
    BackUser login(@Param(value = "account")String account, @Param(value = "password")String password,
                   @Param(value = "phone")String phone);

    List<DriverSalaryRecord> salaryList(@Param(value = "driverId")int driverId, RowBounds rowBounds,
                                        @Param(value = "date")String date);

    int salaryRecord(@Param(value = "driverId")int driverId);

    List<DriverSchedule> recordList(@Param(value = "driverId") int driverId, RowBounds rowBounds,
                                    @Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate);

    int departureRecord(@Param(value = "driverId") int driverId);

    List<DriverSchedule> timeList(@Param(value = "driverId") int driverId, RowBounds rowBounds,
                          @Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate);

    int timeTable(@Param(value = "driverId") int driverId);

    List<DriverSchedule> workload(@Param(value = "driverId") int driverId, RowBounds rowBounds,
                        @Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate);

    int workloadRecord(@Param(value = "driverId") int driverId);

    List<DriverSchedule> checkList(@Param(value = "driverId") int driverId, @Param(value = "date") String date,
                                   @Param(value = "time") String time);

    List<DriverSchedule> busList(@Param(value = "driverId") int driverId, @Param(value = "date") String date,
                                 @Param(value = "time") String time, @Param(value = "nearTime") String nearTime);

    void departure(@Param(value = "driverId")int driverId, @Param(value = "id") int id);

    List<DriverSalaryRecord> deductionList(@Param(value = "driverId") int driverId, RowBounds rowBounds,
                           @Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate);

    int deductionRecord(@Param(value = "driverId")int driverId);

    List<DriverSchedule> schedules(@Param(value = "driverId") int driverId);

    void leave(@Param(value = "driverId") int driverId, @Param(value = "date") String date);
}
